Integrand size = 33, antiderivative size = 118 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=-\frac {\sqrt {2} (A-B) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {2 (3 A-2 B) \tan (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 B \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 a d} \]
[Out]
Time = 0.29 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {4095, 4086, 3880, 209} \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=-\frac {\sqrt {2} (A-B) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 (3 A-2 B) \tan (c+d x)}{3 d \sqrt {a \sec (c+d x)+a}}+\frac {2 B \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 a d} \]
[In]
[Out]
Rule 209
Rule 3880
Rule 4086
Rule 4095
Rubi steps \begin{align*} \text {integral}& = \frac {2 B \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 a d}+\frac {2 \int \frac {\sec (c+d x) \left (\frac {a B}{2}+\frac {1}{2} a (3 A-2 B) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{3 a} \\ & = \frac {2 (3 A-2 B) \tan (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 B \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 a d}+(-A+B) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx \\ & = \frac {2 (3 A-2 B) \tan (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 B \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 a d}+\frac {(2 (A-B)) \text {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d} \\ & = -\frac {\sqrt {2} (A-B) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {2 (3 A-2 B) \tan (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {2 B \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{3 a d} \\ \end{align*}
Time = 0.23 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.90 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\left (-3 \sqrt {2} (A-B) \text {arctanh}\left (\frac {\sqrt {1-\sec (c+d x)}}{\sqrt {2}}\right )+2 \sqrt {1-\sec (c+d x)} (3 A-B+B \sec (c+d x))\right ) \tan (c+d x)}{3 d \sqrt {1-\sec (c+d x)} \sqrt {a (1+\sec (c+d x))}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(266\) vs. \(2(101)=202\).
Time = 3.37 (sec) , antiderivative size = 267, normalized size of antiderivative = 2.26
method | result | size |
default | \(-\frac {\sqrt {-\frac {2 a}{\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}\, \left (3 A \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )+\sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\right ) \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )^{\frac {3}{2}}-3 B \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )+\sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\right ) \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )^{\frac {3}{2}}-6 A \left (1-\cos \left (d x +c \right )\right )^{3} \csc \left (d x +c \right )^{3}+4 B \left (1-\cos \left (d x +c \right )\right )^{3} \csc \left (d x +c \right )^{3}+6 A \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )\right )}{3 d a \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )}\) | \(267\) |
parts | \(-\frac {A \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )+\sqrt {\cot \left (d x +c \right )^{2}-2 \cot \left (d x +c \right ) \csc \left (d x +c \right )+\csc \left (d x +c \right )^{2}-1}\right ) \sqrt {2}\, \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+2 \cot \left (d x +c \right )-2 \csc \left (d x +c \right )\right )}{d a}+\frac {B \sqrt {-\frac {2 a}{\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}\, \left (3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )+\sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\right ) \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )^{\frac {3}{2}}-4 \left (1-\cos \left (d x +c \right )\right )^{3} \csc \left (d x +c \right )^{3}\right )}{3 d a \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )}\) | \(269\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 352, normalized size of antiderivative = 2.98 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\left [-\frac {3 \, \sqrt {2} {\left ({\left (A - B\right )} a \cos \left (d x + c\right )^{2} + {\left (A - B\right )} a \cos \left (d x + c\right )\right )} \sqrt {-\frac {1}{a}} \log \left (-\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 3 \, \cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - 4 \, {\left ({\left (3 \, A - B\right )} \cos \left (d x + c\right ) + B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{6 \, {\left (a d \cos \left (d x + c\right )^{2} + a d \cos \left (d x + c\right )\right )}}, \frac {2 \, {\left ({\left (3 \, A - B\right )} \cos \left (d x + c\right ) + B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right ) + \frac {3 \, \sqrt {2} {\left ({\left (A - B\right )} a \cos \left (d x + c\right )^{2} + {\left (A - B\right )} a \cos \left (d x + c\right )\right )} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )}{\sqrt {a}}}{3 \, {\left (a d \cos \left (d x + c\right )^{2} + a d \cos \left (d x + c\right )\right )}}\right ] \]
[In]
[Out]
\[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {\left (A + B \sec {\left (c + d x \right )}\right ) \sec ^{2}{\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \]
[In]
[Out]
\[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\int { \frac {{\left (B \sec \left (d x + c\right ) + A\right )} \sec \left (d x + c\right )^{2}}{\sqrt {a \sec \left (d x + c\right ) + a}} \,d x } \]
[In]
[Out]
none
Time = 1.22 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.40 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\frac {3 \, \sqrt {2} {\left (A - B\right )} \log \left ({\left | -\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt {-a} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} + \frac {2 \, {\left (\frac {\sqrt {2} {\left (3 \, A a - 2 \, B a\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}{\mathrm {sgn}\left (\cos \left (d x + c\right )\right )} - \frac {3 \, \sqrt {2} A a}{\mathrm {sgn}\left (\cos \left (d x + c\right )\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}}{3 \, d} \]
[In]
[Out]
Timed out. \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}}{{\cos \left (c+d\,x\right )}^2\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \]
[In]
[Out]